import Vue from 'vue'
import VueRouter from 'vue-router'
import Show_info from "../views/Show_info";
import Stat_age from "../views/Stat_age";
import Show_resume from "../views/Show_resume";
import Stat_score from "../views/Stat_score";
import Index from "../views/Index";
import Change_info from "../views/Change_info";
import Show_score_detail from "../views/Show_score_detail";
import Show_score from "../views/Show_score";
import Stat_number from "../views/Stat_number";
import Add_student from "../views/Add_student";
import Change_info_detail from "../views/Change_info_detail";
import Change_resume from "../views/Change_resume";
import Change_score from "../views/Change_score";
import Stat_score_detail from "../views/Stat_score_detail";
import Stat_area from "../views/Stat_area";
import Stat_political from "../views/Stat_political";



Vue.use(VueRouter)

const routes = [

  {
    path:"/",
    name:"基本信息",
    component:Index,
    redirect:"/Show_info",
    children:[
      {
        path: "/Show_info",
        name: "学生信息",
        show:true,
        component: Show_info
      }

    ]
  },
  {
    path: "/navigation2",
    name: "信息管理",
    component: Index,

    children: [
      {
        path: "/Add_student",
        name: "新生注册",
        component: Add_student,
        show:true
      },
      {
        path: "/Change_info",
        name: "学籍更改",
        show:true,
        component: Change_info
      },
      {
        path:"/Show_score_detail",
        name:"成绩登记",
        show:false,
        component:Show_score_detail
      },
      {
        path: "/Change_info_detail",
        component: Change_info_detail,
        show:false
      },
      {
        path: "/Change_resume",
        component: Change_resume,
        show:false
      },
      {
        path: "/Show_resume",
        name: "学生简历",
        show:false,
        component: Show_resume
      },
      {
        path: "/Change_score",
        component: Change_score,
        show:false
      },
      {
        path: "/Stat_score_detail",
        component: Stat_score_detail,
        show:false
      },
      {
        path: "/Stat_age",
        component: Stat_age,
        show:false
      },
      {
        path: "/Stat_area",
        component: Stat_area,
        show:false
      },
      {
        path: "/Stat_political",
        component: Stat_political,
        show:false
      }
    ]
  },
  {
    path:"/navigation",
    name:"统计",
    component:Index,
    children:[
      {
        path: "/Stat_score",
        name: "成绩统计",
        show:true,
        component: Stat_score
      },
      {
        path: "/Stat_number",
        name: "学生人数统计",
        show:true,
        component: Stat_number
      }
    ]
  },
  {
    path: "/navigation",
    name: "查询",
    component: Index,
    children: [
      {
        path:"/Show_score",
        name:"学生成绩",
        show:true,
        component: Show_score
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
